docs: Revise sorter docs a bit
authorMatthias Clasen <mclasen@redhat.com>
Fri, 17 Jul 2020 01:45:11 +0000 (21:45 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 17 Jul 2020 01:45:11 +0000 (21:45 -0400)
docs/reference/gtk/gtk4-docs.xml
gtk/gtkcustomsorter.c
gtk/gtksorter.c

index 3e2751c6b77bf96ec5d231b3bf9fc16049f3ada8..6b5128ca2a1daf55adc79678a44186163a5df6a1 100644 (file)
@@ -65,9 +65,9 @@
       <section>
         <xi:include href="xml/gtksorter.xml" />
         <xi:include href="xml/gtkcustomsorter.xml" />
+        <xi:include href="xml/gtkmultisorter.xml" />
         <xi:include href="xml/gtkstringsorter.xml" />
         <xi:include href="xml/gtknumericsorter.xml" />
-        <xi:include href="xml/gtkmultisorter.xml" />
       </section>
       <xi:include href="xml/gtkselectionmodel.xml" />
       <section>
index 6359fd68b0dae252b412b6f50289007ba5d2adb8..f1bddd954bc3ea61dc3ab413b84071b5c8177da7 100644 (file)
@@ -27,7 +27,7 @@
 /**
  * SECTION:gtkcustomsorter
  * @Title: GtkCustomSorter
- * @Short_description: Sorting with a callback
+ * @Short_description: Sorting with a callbacks
  *
  * GtkCustomSorter is a #GtkSorter implementation that sorts
  * via a traditional #GCompareDataFunc callback.
@@ -108,8 +108,10 @@ gtk_custom_sorter_init (GtkCustomSorter *self)
  * Creates a new #GtkSorter that works by calling
  * @sort_func to compare items.
  *
- * Returns: a new #GTkSorter
- */ 
+ * If @sort_func is %NULL, all items are considered equal.
+ *
+ * Returns: a new #GtkSorter
+ */
 GtkSorter *
 gtk_custom_sorter_new (GCompareDataFunc sort_func,
                        gpointer         user_data,
@@ -129,10 +131,12 @@ gtk_custom_sorter_new (GCompareDataFunc sort_func,
  * @self: a #GtkCustomSorter
  * @sort_func: (nullable): function to sort items
  * @user_data: (nullable): user data to pass to @match_func
- * @user_destroy: destory notify
+ * @user_destroy: destroy notify for @user_data
  *
  * Sets (or unsets) the function used for sorting items.
- * 
+ *
+ * If @sort_func is %NULL, all items are considered equal.
+ *
  * If the sort func changes its sorting behavior,
  * gtk_sorter_changed() needs to be called.
  *
index 9169d229796d19212523247408326d6b776f8790..c07340870d3ad9f5d5b9b6b90a66b3b4d8389e1c 100644 (file)
@@ -37,9 +37,8 @@
  * by calling gtk_sorter_compare() for pairs of items.
  *
  * Sorters may change their sorting behavior through their lifetime. In that case,
- * they call gtk_sorter_changed(), which will emit the #GtkSorter::changed signal to
- * notify that the sort order is no longer valid and should be updated by calling
- * gtk_sorter_compare() again.
+ * they will emit the #GtkSorter::changed signal to notify that the sort order is
+ * no longer valid and should be updated by calling gtk_sorter_compare() again.
  *
  * GTK provides various pre-made sorter implementations for common sorting operations.
  * #GtkColumnView has built-in support for sorting lists via the #GtkColumnViewColumn:sorter